//    Copyright (C) Kherty.  All rights reserved.
using System;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.IO;

namespace OpenLS.Spreadsheet.Formats.Biff.Records
{
    internal abstract class UnhandledRecord : BiffRecord
    {
        private byte[] _data;

        public UnhandledRecord()
        {
            Debug.WriteLine("Not handled " + GetType());
            Contract.Assert(false, GetType().FullName);
          //\\  Debug.WriteLine(string.Format("Unhandled record {0}, {1} ", GetType(), (int) this.RecordType));
        }




        internal override void WriteContent(BiffWriterWorkbookContext context)
        {
            context.Write(_data);
        }

        protected override void ReadContent(BiffReaderContext context, int length)
        {
            _data = context.ReadBytes(length);
        }
    }
}